package com.example.textswitchtestdemo01.util;

import com.example.textswitchtestdemo01.bean.AllProductionLine;
import com.example.textswitchtestdemo01.bean.Material;
import com.example.textswitchtestdemo01.bean.NewsInfo;
import com.example.textswitchtestdemo01.bean.UserAppointment;
import com.example.textswitchtestdemo01.bean.UserNormalCarStore;

import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;

public interface RetrofitAPI {

    @POST("dataInterface/UserNormalCarStore/getAll")
    Call<UserNormalCarStore> getUserNormalCarStoreInfo();

    @POST("dataInterface/UserAppointment/getAll")
    Call<UserAppointment> getAllUserAppointment();

    @POST("dataInterface/UserAppointment/create")
    Call<UserAppointment> addUserAppointment(@Body RequestBody body);


    @POST("dataInterface/UserAppointment/create")
    @Headers("Content-Type:application/x-www-form-urlencoded;charset=utf-8")
    Call<UserAppointment> addAppointment(@Body UserAppointment.DataBean bean);

    @POST("dataInterface/UserProductionLine/getAll")
    Call<AllProductionLine> getAllProductionLine();

    @POST("dataInterface/UserProductionLine/create")
    Call<AllProductionLine> addProductionLine(@Body RequestBody body);

    @POST("Interface/index/getMaterial")
    Call<Material> getAllMaterial();

    @POST("dataInterface/Information/getAll")
    Call<NewsInfo> getAllNews();

    @POST("dataInterface/Information/getInfo")
    Call<NewsInfo> getNewsById(@Body RequestBody body);
}
